@echo off
echo ========================================
echo 测试SQL查询调试
echo ========================================

echo.
echo 1. 检查后端服务状态...
netstat -an | findstr :8080
if %errorlevel% neq 0 (
    echo 后端服务未运行，请先启动后端服务
    pause
    exit /b 1
)

echo.
echo 2. 测试具体搜索条件...
echo 测试: 老人姓名=王老, 护理员=user07, 护理项目=复健运动, 状态=待执行

echo.
echo 发送API请求...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=10&elderly_name=王老&caregiver_name=user07&nursing_item_name=复健运动&status=待执行"

echo.
echo 3. 测试只有老人姓名...
echo 测试: 老人姓名=王老
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=10&elderly_name=王老"

echo.
echo 4. 测试只有护理员...
echo 测试: 护理员=user07
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=10&caregiver_name=user07"

echo.
echo 5. 测试只有护理项目...
echo 测试: 护理项目=复健运动
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=10&nursing_item_name=复健运动"

echo.
echo 测试完成！
pause
